<template>
<div>
	<hr>
	<el-button @click='fn1'>AParent1-11</el-button>
    <AChild1 @textclick='fn2' ref="AChild1Ref" />
</div>
</template>
<script>
import { ref } from 'vue'
import AChild1 from '/@/compositionAPI/message/AChild1.vue'

export default {
	name: 'AParent1',
	components: {
		AChild1,
	},
	setup (props, context) {
		const AChild1Ref = ref(null);
		const fn1 = () => {
			console.log('fn1', '父调子');
			AChild1Ref.value.fnB2('888');
		};
		const fn2 = (val) => {
			console.log('AParent1', val);
		};
		const fn3 = () => {
			console.log('fn3', 33);
		};
		return {
			AChild1Ref,
			fn1,
			fn2,
			fn3,
		}
	},
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>